Skip to content

improve closed connection handling #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2016

Conversation

GertSallaerts
Copy link

@GertSallaerts GertSallaerts commented Sep 30, 2016

Related to my previous PR (#137).

  • Not sure why it seemed to work, but the _handleConnectionTerminated handler never really worked because it wasn't bound correctly and 'this.onerror is always undefined. So I bound the function.
  • Upon reflection, I don't think that the server closing a connection should be considered as an error, the connection is simply not open anymore for whatever reason. Once you try to open a new connection, you'll get a more accurate error message like the server not being reachable anymore for example or no error is there is a failover setup configured, ... So instead of throwing an error, I close the connection.
  • The pool did not call the _destroy method on resources that are detected as invalid during acquisition, so they weren't being cleaned up correctly.

@pontusmelke
Copy link
Contributor

Awesome, thanks! I am currently looking into this. I think I will end up putting the onerror call back.

@pontusmelke pontusmelke merged commit ce8ee5c into neo4j:1.1 Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants